a = 'abcd12345321abc'

print(a.rfind('a'))